package com.youku.component.result;

import java.sql.ResultSet;
import java.sql.SQLException;

public class QueryExecuteResult implements ExecuteResult {
	private ResultSet resultSet;

	public QueryExecuteResult(ResultSet resultSet) {
		super();
		this.resultSet = resultSet;
	}

	public ResultSet getResultSet() {
		return resultSet;
	}

	public void setResultSet(ResultSet resultSet) {
		this.resultSet = resultSet;
	}

	public String findByField(String field) {
		try {
			return resultSet.getString(field);
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}
	}

}
